<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var num = 1
        // var add = 0
        // var reduce = 0
        // var seven = 0
        // while(num<=100){
        //     if(num%2==0){
        //         add +=num
        //     }
        //     else if(num%2!=0){
        //         reduce +=num
        //     }
        //     if(num%7==0){
        //         seven +=num
        //     }
        // num++
        // }
        // console.log(`偶数和${add}`)
        // console.log('奇数和'+reduce)
        // console.log(`7的倍数和${seven}`)



        
        var num =parseInt(prompt("请输入数字"))
        var base = 1
        var one = 1
        while(base <=num){
           one *=base
           base++
            // console.log(one)
        }
        console.log(one)
    </script>
</body>
</html>